#ifndef _IPCP_AUTO_H
#define _IPCP_AUTO_H

#include <stdio.h>
#include <ipcp.h>
#include <unistd.h>
#include "string"
#include <netinet/in.h>
#include <android/log.h>
#include "iostream"
#include "vp/AudioRadio.h"
#include "vp/VGM_TX.h"
#include "vp/VGM_RX.h"
#include "vp/VDDM_RX.h"
#include "vp/CARCONFIG_RX.h"
#include "vp/CARCONFIGTHOUSAND_RX.h"
#include "vp/TIMEOUT_RX.h"
#include "vp/Climate.h"
#include "vp/SRS_RX.h"
#include "vp/CEM_RX.h"
#include "vp/BBM_RX.h"
#include "vp/ASDM_RX.h"
#include "cp/Normal.h"
#include "vp/Power.h"

// Android log function wrappers
static const char* kTAG = "ipcpsend";
#define LOGI(...) \
  ((void)__android_log_print(ANDROID_LOG_INFO, kTAG, __VA_ARGS__))
#define LOGW(...) \
  ((void)__android_log_print(ANDROID_LOG_WARN, kTAG, __VA_ARGS__))
#define LOGE(...) \
  ((void)__android_log_print(ANDROID_LOG_ERROR, kTAG, __VA_ARGS__))
//LOGE("Unable to get version string @ line %d", __LINE__);


bool send_message(int ser_id, int operation_id, void* msg, int msg_len);
bool set_int_signal(int ser_id, int operation_id, int32_t availability, int32_t data, int32_t ff, int32_t status);
bool set_string_signal(int ser_id, int operation_id, int32_t availability, std::string data, int32_t ff, int32_t status);
std::string get_message(int ser_id, int operation_id);
std::string reg_callback(int operation_id);
bool set_config(uint16_t service_id, uint16_t oper_ids[], int size);
bool set_carconfig_signal(int ser_id, int operation_id,int configs[], uint8_t values[], int len);
bool set_vgm_signal(int ser_id, int operation_id,std::string vgms[], int values[], int len);
bool set_srs_signal(int ser_id, int operation_id,std::string vgms[], int values[], int len);
bool get_alive();
void set_alive(bool a);
bool set_carconfig1000_signal(int ser_id, int operation_id,int configs[], uint8_t values[], int len);
bool set_timeout_signal(int ser_id, int operation_id,std::string touts[], int values[], int len);
bool set_climate_signal(int ser_id, int operation_id,std::string climates[], int availabilities[], int data[],int len);
bool set_clima_signal(int ser_id, int operation_id, std::string climates[], int values[], int len);
bool set_cem_signal(int ser_id, int operation_id,std::string vgms[], int values[], int len);
bool set_vddm_signal(int ser_id, int operation_id,std::string vddms[], int values[], int len);
bool set_bbm_signal(int ser_id, int operation_id, std::string bbms[], int values[], int len);
bool set_asdm_signal(int ser_id, int operation_id, std::string arrs[], int values[], int len);
bool set_dmsm_signal(int ser_id, int operation_id, std::string arrs[], int values[], int len);
bool set_cdm_signal(int ser_id, int operation_id, std::string arrs[], int values[], int len);
bool set_hud_signal(int ser_id, int operation_id, std::string huds[], int values[], int len);
bool set_dim_hud_signal(int ser_id, int operation_id, std::string huds[], int values[], int len);
bool set_ccsm_signal(int ser_id, int operation_id,std::string ccsm[], int values[], int len);
bool set_swsm_signal(int ser_id, int operation_id,std::string swsm[], int values[], int len);
bool set_fpl_signal(int ser_id, int operation_id,std::string fpl[], int values[], int len);
bool set_sooti_signal(int ser_id, int operation_id,std::string fpl[], int values[], int len);
bool set_powerctl_signal(int ser_id, int operation_id,std::string power[], int values[], int len);
bool set_pdcm_signal(int ser_id, int operation_id, std::string arrs[], int values[], int len);
#endif